<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"/>
    <title>首页</title>
    <link rel="stylesheet" href="css/conmon.css"/>
    <link rel="stylesheet" href="css/index2.css"/>
    <script src="./lib/jquery/jquery.js"></script>
    <script src="./lib/template.js"></script>
    <script src="js/index.js"></script>
</head>
<body>
<!--容器-->
<div class='mbuy container'>
    <!-- header start-->
    <header class='mbuy_header'>
        <!--头部  橘黄色盒子设置-->
        <div class='mbuy_header_box'>
            <a href="#"><img src="images/header_logo.png" class="log"/></a>
            <a href="#"><img src="images/header_app.png" class="app"/></a>
        </div>
    </header>
    <!--header end-->
    <!--search start-->
    <div class='mbuy_search'>
        <!--表单-->
        <form>
            <!--输入框-->
            <input type="text" class="sousuo" placeholder="请输入你想比价的商品"/>
            <!--按钮-->
            <a href="#" class="login">搜索</a>
        </form>
    </div>
    <!--search end-->
    <!--nav start-->
    <nav class='mbuy_nav' id='info'>
    </nav>
    <!--nav end-->
    <!--main start-->
    <main class='mbuy_product'>
        <!--橘黄色横条-->
        <div class="product_box">
            <p>超值折扣推荐</p>
            <a href="#"></a>
        </div>
        <!--页面主体内容  模板加入-->
        <div id="product_container"></div>
    </main>
    <!--main end-->
    <!--更多 横条-->
    <div class="youhui">
        <p>更多优惠信息 》》</p>
    </div>
    <!--橘色横条-->
    <div class="product_box">
        <p>品牌排行</p>
        <a href="#"></a>
    </div>
    <!--footer start-->
    <!--底部横条-->
    <div class="footer_txt">
        <ul>
            <li>登录</li>
            <li>注册</li>
            <li>返回顶部</li>
        </ul>
    </div>
    <div class="footer">
        <p><span class="redt">手机APP下载</span>慢慢买手机版-掌上比价平台</p>
        <p>manmanbuy cn</p>
    </div>
    <!--footer end-->
</div>
</body>
<!--模板   -->
<script type="text/html" id="template">
    {{if result}}
    <ul class="nav clearfix">
        {{each result as v}}
        <li>
            <a href={{v.titlehref}}>
                {{#v.img}}
                <p>{{v.name}}</p>
            </a>
        </li>
        {{/each}}
    </ul>
    {{/if}}
</script>
<!--模板-->
<script type="text/html" id="template2">
    {{if result}}
    {{each result as v}}
    <div class="product_list clearfix">
        <div class="product_img f_left">
            {{#v.productImgSm}}
        </div>
        <div class="product_text">
            <p>{{v.productName}}
                <span class="redt">{{v.productPinkage}}</span></p>
            <p>
                <span>
                    {{v.productFrom}} | {{v.productTime}}
                </span>
                <span class="text_1">
                    <img src="images/comments.png"/> {{/\d+/g.exec(v.productComCount)[0]}}
                </span>
            </p>
        </div>
    </div>
    {{/each}}
    {{/if}}
</script>
</html>
